package com.kt.thread.demo.model;

/**
 * @Description:
 * @Author: kt
 * @CreateTime: 2021/3/13
 */
public class ServerTask implements Runnable {
    private Client client;
    private String data;

    public ServerTask(Client client, String data) {
        this.client = client;
        this.data = data;
    }

    @Override
    public void run() {
        System.out.println("线程" + Thread.currentThread().getName() + "在处理返回到客户端的数据");
        client.recv(data);
    }
}
